package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.PermissionMapper;
import cn.csdj.sism.pojo.Permission;
import cn.csdj.sism.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author 李加
 * 2023/4/10
 */
@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionMapper permissionMapper;
    @Override
    public List<Permission> selectPerAll() {
        return permissionMapper.selectList(null);
    }

    @Override
    public Permission selectPerById(Integer id) {
        return permissionMapper.selectById(id);
    }

    @Override
    public int insertPer(Permission permission) {
        return permissionMapper.insert(permission);
    }

    @Override
    public int updatePer(Permission permission) {
        return permissionMapper.updateById(permission);
    }

    @Override
    public int delectPerById(Integer id) {
        return permissionMapper.deleteById(id);
    }
}
